namespace ext.data
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>Configuration Structure</summary>
	/// <definedin>src\data\DataProxy.js</definedin>
	public sealed class DataProxy_Configuration : Record
	{
		
		#region Fields
		/// <summary>
		/// Specific urls to call on CRUD action methods &quot;read&quot;, &quot;create&quot;, &quot;update&quot; and &quot;destroy&quot;.
		/// Defaults to: 
		/// api: {
		/// read : undefined,
		/// create : undefined,
		/// update : undefined,
		/// destroy : undefined
		/// }
		///  The url is built based upon the action being executed [load|create|save|destroy]
		/// using the commensurate {@link #api} property, or if undefined default to the
		/// configured {@link Ext.data.Store}.{@link Ext.data.Store#url url}.
		/// </summary>
		/// <htmlSummary>
		/// Specific urls to call on CRUD action methods &quot;read&quot;, &quot;create&quot;, &quot;update&quot; and &quot;destroy&quot;.
		/// Defaults to:&lt;pre&gt;&lt;code&gt;
		/// api: {
		/// read : undefined,
		/// create : undefined,
		/// update : undefined,
		/// destroy : undefined
		/// }
		/// &lt;/code&gt;&lt;/pre&gt;
		/// &lt;p&gt;The url is built based upon the action being executed &lt;tt&gt;[load|create|save|destroy]&lt;/tt&gt;
		/// using the commensurate &lt;tt&gt;{@link #api}&lt;/tt&gt; property, or if undefined default to the
		/// configured {@link Ext.data.Store}.{@link Ext.data.Store#url url}.&lt;/p&gt;&lt;br&gt;
		/// &lt;p&gt;For example:&lt;/p&gt;
		/// &lt;pre&gt;&lt;code&gt;
		/// api: {
		/// load : &apos;/controller/load&apos;,
		/// create : &apos;/controller/new&apos;, // Server MUST return idProperty of new record
		/// save : &apos;/controller/update&apos;,
		/// destroy : &apos;/controller/destroy_action&apos;
		/// }
		///
		/// // Alternatively, one can use the object-form to specify each API-action
		/// api: {
		/// load: {url: &apos;read.php&apos;, method: &apos;GET&apos;},
		/// create: &apos;create.php&apos;,
		/// destroy: &apos;destroy.php&apos;,
		/// save: &apos;update.php&apos;
		/// }
		/// &lt;/code&gt;&lt;/pre&gt;
		/// &lt;p&gt;If the specific URL for a given CRUD action is undefined, the CRUD action request
		/// will be directed to the configured &lt;tt&gt;{@link Ext.data.Connection#url url}&lt;/tt&gt;.&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: To modify the URL for an action dynamically the appropriate API
		/// property should be modified before the action is requested using the corresponding before
		/// action event. For example to modify the URL associated with the load action:
		/// &lt;pre&gt;&lt;code&gt;
		/// // modify the url for the action
		/// myStore.on({
		/// beforeload: {
		/// fn: function (store, options) {
		/// // use &lt;tt&gt;{@link Ext.data.HttpProxy#setUrl setUrl}&lt;/tt&gt; to change the URL for *just* this request.
		/// store.proxy.setUrl(&apos;changed1.php&apos;);
		///
		/// // set optional second parameter to true to make this URL change
		/// // permanent, applying this URL for all subsequent requests.
		/// store.proxy.setUrl(&apos;changed1.php&apos;, true);
		///
		/// // Altering the proxy API should be done using the public
		/// // method &lt;tt&gt;{@link Ext.data.DataProxy#setApi setApi}&lt;/tt&gt;.
		/// store.proxy.setApi(&apos;read&apos;, &apos;changed2.php&apos;);
		///
		/// // Or set the entire API with a config-object.
		/// // When using the config-object option, you must redefine the &lt;b&gt;entire&lt;/b&gt;
		/// // API -- not just a specific action of it.
		/// store.proxy.setApi({
		/// read : &apos;changed_read.php&apos;,
		/// create : &apos;changed_create.php&apos;,
		/// update : &apos;changed_update.php&apos;,
		/// destroy : &apos;changed_destroy.php&apos;
		/// });
		/// }
		/// }
		/// });
		/// &lt;/code&gt;&lt;/pre&gt;
		/// &lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\data\DataProxy.js</definedin>
		[ScriptName("api")]
		public object Api;
		
		/// <summary>Defaults to false. Set to true to operate in a RESTful manner.</summary>
		/// <htmlSummary>
		/// &lt;p&gt;Defaults to &lt;tt&gt;false&lt;/tt&gt;. Set to &lt;tt&gt;true&lt;/tt&gt; to operate in a RESTful manner.&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt; Note: this parameter will automatically be set to &lt;tt&gt;true&lt;/tt&gt; if the
		/// {@link Ext.data.Store} it is plugged into is set to &lt;code&gt;restful: true&lt;/code&gt;. If the
		/// Store is RESTful, there is no need to set this option on the proxy.&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;RESTful implementations enable the serverside framework to automatically route
		/// actions sent to one url based upon the HTTP method, for example:
		/// &lt;pre&gt;&lt;code&gt;
		/// store: new Ext.data.Store({
		/// restful: true,
		/// proxy: new Ext.data.HttpProxy({url:&apos;/users&apos;}); // all requests sent to /users
		/// ...
		/// )}
		/// &lt;/code&gt;&lt;/pre&gt;
		/// If there is no &lt;code&gt;{@link #api}&lt;/code&gt; specified in the configuration of the proxy,
		/// all requests will be marshalled to a single RESTful url (/users) so the serverside
		/// framework can inspect the HTTP Method and act accordingly:
		/// &lt;pre&gt;
		/// &lt;u&gt;Method&lt;/u&gt; &lt;u&gt;url&lt;/u&gt; &lt;u&gt;action&lt;/u&gt;
		/// POST /users create
		/// GET /users read
		/// PUT /users/23 update
		/// DESTROY /users/23 delete
		/// &lt;/pre&gt;&lt;/p&gt;
		/// &lt;p&gt;If set to &lt;tt&gt;true&lt;/tt&gt;, a {@link Ext.data.Record#phantom non-phantom} record&apos;s
		/// {@link Ext.data.Record#id id} will be appended to the url. Some MVC (e.g., Ruby on Rails,
		/// Merb and Django) support segment based urls where the segments in the URL follow the
		/// Model-View-Controller approach:&lt;pre&gt;&lt;code&gt;
		/// someSite.com/controller/action/id
		/// &lt;/code&gt;&lt;/pre&gt;
		/// Where the segments in the url are typically:&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
		/// &lt;li&gt;The first segment : represents the controller class that should be invoked.&lt;/li&gt;
		/// &lt;li&gt;The second segment : represents the class function, or method, that should be called.&lt;/li&gt;
		/// &lt;li&gt;The third segment : represents the ID (a variable typically passed to the method).&lt;/li&gt;
		/// &lt;/ul&gt;&lt;/div&gt;&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;Refer to &lt;code&gt;{@link Ext.data.DataProxy#api}&lt;/code&gt; for additional information.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\data\DataProxy.js</definedin>
		[ScriptName("restful")]
		public bool Restful;
		
		/// <summary>
		/// Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers.
		/// (e.g.: {@link Ext.data.HttpProxy#doRequest HttpProxy.doRequest},
		/// {@link Ext.data.DirectProxy#doRequest DirectProxy.doRequest}).
		/// </summary>
		/// <htmlSummary>
		/// Abstract method that should be implemented in all subclasses. &lt;b&gt;Note:&lt;/b&gt; Should only be used by custom-proxy developers.
		/// (e.g.: {@link Ext.data.HttpProxy#doRequest HttpProxy.doRequest},
		/// {@link Ext.data.DirectProxy#doRequest DirectProxy.doRequest}).
		/// </htmlSummary>
		/// <definedin>src\data\DataProxy.js</definedin>
		[ScriptName("doRequest")]
		public System.Delegate DoRequest;
		
		/// <summary>Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers. Callback for read {@link Ext.data.Api#actions action}.</summary>
		/// <htmlSummary>Abstract method that should be implemented in all subclasses. &lt;b&gt;Note:&lt;/b&gt; Should only be used by custom-proxy developers. Callback for read {@link Ext.data.Api#actions action}.</htmlSummary>
		/// <definedin>src\data\DataProxy.js</definedin>
		[ScriptName("onRead")]
		public System.Delegate OnRead;
		
		/// <summary>Abstract method that should be implemented in all subclasses. Note: Should only be used by custom-proxy developers. Callback for create, update and destroy {@link Ext.data.Api#actions actions}.</summary>
		/// <htmlSummary>Abstract method that should be implemented in all subclasses. &lt;b&gt;Note:&lt;/b&gt; Should only be used by custom-proxy developers. Callback for &lt;i&gt;create, update and destroy&lt;/i&gt; {@link Ext.data.Api#actions actions}.</htmlSummary>
		/// <definedin>src\data\DataProxy.js</definedin>
		[ScriptName("onWrite")]
		public System.Delegate OnWrite;
		#endregion
		
		#region ext.util.Observable_Configuration Members
		/// <summary>
		/// A config object containing one or more event handlers to be added to this
		/// object during initialization. This should be a valid listeners config object as specified in the
		/// {@link #addListener} example for attaching multiple handlers at once.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;A config object containing one or more event handlers to be added to this
		/// object during initialization. This should be a valid listeners config object as specified in the
		/// {@link #addListener} example for attaching multiple handlers at once.&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;DOM events from ExtJs {@link Ext.Component Components}&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
		/// &lt;br&gt;&lt;p&gt;While &lt;i&gt;some&lt;/i&gt; ExtJs Component classes export selected DOM events (e.g. &quot;click&quot;, &quot;mouseover&quot; etc), this
		/// is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}&apos;s
		/// &lt;b&gt;&lt;code&gt;{@link Ext.DataView#click click}&lt;/code&gt;&lt;/b&gt; event passing the node clicked on. To access DOM
		/// events directly from a Component&apos;s HTMLElement, listeners must be added to the &lt;i&gt;{@link Ext.Component#getEl Element}&lt;/i&gt; after the Component
		/// has been rendered. A plugin can simplify this step:&lt;pre&gt;&lt;code&gt;
		/// // Plugin is configured with a listeners config object.
		/// // The Component is appended to the argument list of all handler functions.
		/// Ext.DomObserver = Ext.extend(Object, {
		/// constructor: function(config) {
		/// this.listeners = config.listeners ? config.listeners : config;
		/// },
		///
		/// // Component passes itself into plugin&amp;#39;s init method
		/// init: function(c) {
		/// var p, l = this.listeners;
		/// for (p in l) {
		/// if (Ext.isFunction(l[p])) {
		/// l[p] = this.createHandler(l[p], c);
		/// } else {
		/// l[p].fn = this.createHandler(l[p].fn, c);
		/// }
		/// }
		///
		/// // Add the listeners to the Element immediately following the render call
		/// c.render = c.render.{@link Function#createSequence createSequence}(function() {
		/// var e = c.getEl();
		/// if (e) {
		/// e.on(l);
		/// }
		/// });
		/// },
		///
		/// createHandler: function(fn, c) {
		/// return function(e) {
		/// fn.call(this, e, c);
		/// };
		/// }
		/// });
		///
		/// var combo = new Ext.form.ComboBox({
		///
		/// // Collapse combo when its element is clicked on
		/// plugins: [ new Ext.DomObserver({
		/// click: function(evt, comp) {
		/// comp.collapse();
		/// }
		/// })],
		/// store: myStore,
		/// typeAhead: true,
		/// mode: &apos;local&apos;,
		/// triggerAction: &apos;all&apos;
		/// });
		/// &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\ext-core\src\util\Observable.js</definedin>
		/// <optional>Optional Field</optional>
		[ScriptName("listeners")]
		public object Listeners;
		#endregion
	}
}
